<script>
function getL(id){ 
var e=document.getElementById(id);
var l=e.offsetLeft; 
while(e=e.offsetParent){ 
l+=e.offsetLeft; 
} 
return l 
} 
</script>
